package com.businesscard.system.mapper;

import com.businesscard.system.entity.BusinessCardFolder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BusinessCardFolderMapper {
    
    // 插入新名片夹
    int insertFolder(BusinessCardFolder folder);
    
    // 更新名片夹信息
    int updateFolder(BusinessCardFolder folder);
    
    // 根据ID查询名片夹
    BusinessCardFolder selectFolderById(@Param("id") Integer id);
    
    // 查询用户所有未删除的名片夹
    List<BusinessCardFolder> selectFoldersByUserId(@Param("userId") Integer userId);
    
    // 查询用户删除的名片夹(回收站)
    List<BusinessCardFolder> selectDeletedFoldersByUserId(@Param("userId") Integer userId);
    
    // 逻辑删除名片夹(移入回收站)
    int logicalDeleteFolder(@Param("id") Integer id);
    
    // 恢复已删除的名片夹
    int restoreFolder(@Param("id") Integer id);
    
    // 彻底删除名片夹
    int deleteFolder(@Param("id") Integer id);
} 